/**
 * ClassName: Exercise3
 * Package: PACKAGE_NAME
 * Description:
 *
 * @Author fjorid
 * @Create 2025/2/18 21:08
 * @Version 1.0
 */
public class Exercise3 {


    public static int method(int m, int n) {

        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                System.out.print("*");
            }
            System.out.println();
        }


        int area = m * n;
        return area;
    }

    public static void main(String[] args) {

        int m = 5;
        int n = 6;


        int area = method(m, n);


        System.out.println("该矩形的面积是: " + area);
    }
}